import threading
import time

def working():
    for i in range(10):
        print(i)
        time.sleep(0.2)

if __name__ == '__main__':
    sub_thread = threading.Thread(target=working)
    sub_thread.start()

    time.sleep(1)
    print('主线程结束')